package com.example.androidmainshixun.view;

import android.view.View;
import android.widget.ImageButton;
import android.widget.TextView;

import com.example.androidmainshixun.R;
import com.example.androidmainshixun.base.BaseFragment;

public class SoldGoodsFragment extends BaseFragment {
    @Override
    protected int getLayoutId() {
        return R.layout.fragment_sold_goods;
    }
    @Override
    protected void initView() {
        ImageButton backButton = mView.findViewById(R.id.backButton);
        TextView tabAll = mView.findViewById(R.id.tab_all);
        TextView tabPendingPayment = mView.findViewById(R.id.tab_pending_payment);
        TextView tabPendingShipment = mView.findViewById(R.id.tab_pending_shipment);
        TextView tabPendingReceipt = mView.findViewById(R.id.tab_pending_receipt);
        TextView tabPendingReview = mView.findViewById(R.id.tab_pending_review);
        TextView tabRefund = mView.findViewById(R.id.tab_refund);
        // 返回按钮点击事件
        backButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (getActivity() != null) {
                    getActivity().onBackPressed();
                }
            }
        });

        // 这里可以添加标签点击监听器，如果需要处理标签切换
        tabAll.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // 处理全部标签点击事件


            }
        });

        tabPendingPayment.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // 处理待付款标签点击事件
            }
        });

        tabPendingShipment.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // 处理待发货标签点击事件
            }
        });

        tabPendingReceipt.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // 处理待收货标签点击事件
            }
        });

        tabPendingReview.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // 处理待评价标签点击事件
            }
        });

        tabRefund.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // 处理退款/售后标签点击事件
            }
        });
    }

    @Override
    protected void initListener() {

    }

}